package com.itany.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * Author:yaozhiyuan0117@163.com
 * Time:2019/12/20 14:55
 * Describe:
 * version:1.0
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Article {

    private Integer id;
    private String title;
    private String info;
    private Double price;
    private String imgurls;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createdate;
    private String mode;
    private Integer status;
    private ArticleType type;
    private User user;

    // id int auto_increment primary key,
    // title varchar(300),
    // info longtext,
    // price double,
    // imgurls varchar(200),
    // createdate datetime,
    // mode varchar(20), -- 交易方式：物品置换、现金购买、物品求购
    // status int, -- 物品状态：上架、下架
    // type_id int, -- 物品类型id
    // user_id int, -- 发布用户id
    // foreign key (type_id) references t_article_type(id),
    // foreign key (user_id) references t_user(id)

}
